$(function () {
  // 判断token是否存在
  let token = localStorage.getItem('mytoken');
  if (!token) {
    location.href = './login.html';
  }


  // 退出按钮的点击事件
  $('#logout-btn').on('click', function () {
    localStorage.removeItem('mytoken');
    location.href = './login.html';
  })

})